<script type="text/javascript"><!--//--><![CDATA[//><!--

	var grid_reload = function(){
		$('#datagrid').datagrid('reload', $('#fm_search').serializeObject());
	};

	$(document).ready(function() {
		// Setup Datagrid
		$('#datagrid').datagrid({  
			url:gs_path+'/'+controller+'/getdata', 
			queryParams: $('#fm_search').serializeObject(),
			height:340,
			pagination:true,
			columns:[[
				{ field : 'ck', checkbox:true, width: 40, align: 'center', rowspan:2},
				{ field : 'no_surat', title : 'No Surat', width:100, sortable:true, rowspan:2},				
				{ field : 'nama_penyelenggara', title : 'Nama Penyelenggara', width:150, sortable:true, rowspan:2},
				{ field : 'alamat', title : 'Alamat', width:200, sortable:true, rowspan:2},
				{ field : 'diwakili_oleh', title : 'Diwakili Oleh', width:170, sortable:true, rowspan:2},
				{ field : 'no_telp', title : 'No Telp', width:170, sortable:true, rowspan:2},
				]
			]
		});
		 
/*		// Setup Form
		$('#form_master').setupForm([
			{ name: 'no', type: 'text', size: 'short', maxlength: 20, noempty:true },
			{ name: 'nama', type: 'text', size: 'long', maxlength: 200, noempty:true },
			{ name: 'no_telp', type: 'text', size: 'short', maxlength: 200, noempty:true },
			{ name: 'alamat', type: 'text', size: 'long', maxlength: 200, noempty:true },
			{ name: 'email', type: 'text', size: 'long', maxlength: 200, noempty:true },
			{ name: 'keterangan', type: 'text', size: 'long', maxlength: 400, noempty:true },
		]);
		
		
		// Create Dialog
		$('#dialog_container').dialog({
			closed:true,
			modal:true,
			title: '_',
			width:600,
			height:400,
			buttons:[{
				text:'Save',
				iconCls:'icon-save',
				handler:function(){
					$('#form_master').submitForm('/'+controller+'/ajax_post', { onComplete : function(){ $('#dialog_container').dialog('close'); $('#datagrid').datagrid('reload'); }} );
				}
			},{
				text:'Close',
				iconCls:'icon-cancel',
				handler:function(){
					$('#dialog_container').dialog('close');
				}
			}]
		});*/
		
		
/*		//Set Action Button
		var buttons = [ { label: 'Print Satuan', icon: 'print', onclick: function() {

						var oSel = $('#datagrid').datagrid('getSelected');
					        if (oSel == null) {
					            $.messager.alert('&nbsp;', gs_msg_row_unselected, 'warning'); 
					        } else {
								window.location = gs_path + '/pro_print_excel_new/data_penyelenggara_satuan2/?no_surat='+urlencode(oSel.no_surat);
					        } 
							
						} 

						},
						];
		setAction(buttons);
*/		
		
		$('#fm_search').focusFirst();
	});
//--><!]]></script>

<div id="tb" style="padding:5px;height:auto">
    <div>
        <form id="fm_search" onsubmit="grid_reload(); return false;">
        	<table class="tb_form" style="margin-bottom:0px">
            <tr>
            	<td width="100">Keyword</td>
                <td><input type="text" id="keyword" name="keyword" class="textfield medium" />
                	<a href="#" class="easyui-linkbutton" iconCls="icon-search" onclick="grid_reload(); return false;">Search</a>
                </td>
            </tr>
            </table>
        </form>
    </div>
</div>
<div id="datagrid" toolbar="#tb"></div>

<!-- 
<div id="dialog_container" style="padding:5px;width:600px;height:250px;">
	<form id="form_master">
    <table class="tb_form" style="width:100%;" cellpadding="0" cellspacing="0">
    <tr>
        <td class="label" style="width:150px">No</td>
        <td><input id="no" /></td>
    </tr>
    <tr>
        <td class="label" style="width:150px">Nama</td>
        <td><input id="nama" /></td>
    </tr>    
    <tr>
        <td class="label" style="width:150px">No Telepon</td>
        <td><input id="no_telp" /></td>
    </tr>    
	<tr>
        <td class="label" style="width:150px">Alamat</td>
        <td><input id="alamat" /></td>
    </tr>
    <tr>
        <td class="label" style="width:150px">Email</td>
        <td><input id="email" /></td>
    </tr>
    <tr>
        <td class="label" style="width:150px">Keterangan</td>
        <td><textarea id="keterangan" name="keterangan" /></td>
    </tr>
    </table>
	</form>
</div> -->